<?python
    from turbogears import identity
    from mnemoply import model
?>
<span xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/">
    <table>
        <tbody>
        <tr py:for="gl in model.GroupLesson.selectBy(group=obj).orderBy('date')">
            <td py:if="not gl.excludeLesson">Add lesson</td>
            <td py:if="gl.excludeLesson">Remove lesson</td>

            <td>${gl["date"]}</td>

            <td py:if="identity.has_any_permission('dba', 'GroupLesson/edit')">
                <a href="delete_change?change_id=${gl.id}">delete</a>
            </td>
        </tr>
        </tbody>
    </table>

    <hr />

    <span py:if="identity.has_any_permission('dba', 'GroupLesson/edit')">${ET(tab.add_form())}</span>
</span>

